From 5a6a776a650abf3a7353522f43086d33e66dc961 Mon Sep 17 00:00:00 2001 From: Stefano Stabellini Date: Thu, 26 May 2011 15:05:47 +0100 Subject: [PATCH] libxl: libxl_domain_setmaxmem: actually call xc_domain_setmaxmem Currently libxl_domain_setmaxmem doesn't do anything, but it should call xc_domain_setmaxmem to enforce the new "xen maximum" target for the domain (see tools/libxl/libxl_memory.txt). Signed-off-by: Stefano Stabellini Acked-by: Ian Jackson Committed-by: Ian Jackson --- tools/libxl/libxl.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index a096d60f3d..83c566f438 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -1795,6 +1795,13 @@ int libxl_domain_setmaxmem(libxl_ctx *ctx, uint32_t domid, uint32_t max_memkb) LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "memory_static_max must be greater than or or equal to memory_dynamic_max\n"); goto out; } + rc = xc_domain_setmaxmem(ctx->xch, domid, max_memkb + LIBXL_MAXMEM_CONSTANT); + if (rc != 0) { + LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, + "xc_domain_setmaxmem domid=%d memkb=%d failed " + "rc=%d\n", domid, max_memkb + LIBXL_MAXMEM_CONSTANT, rc); + goto out; + } rc = 0; out: -- 2.30.2